home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
CADAR
/
Symbols
/
12-tone
/
create-twelve-tone-rows
< prev
Wrap
Lisp/Scheme
|
1998-10-22
|
3KB
|
84 lines
create-twelve-tone-rows
name row &key (type :int) (add-rautavara-vars nil)
legal types is :int and :symb
This function automatically creates all 48 variants of row.
That is: the twelve transposed versions of original-row,
inverted-row, retrograded-row and inverted-retrograded-row
and binds them all with setq to name.
so with name 'row you will get
row0-o -> row-11-o
row0-i -> row-11-i
row0-r -> row-11-r
row0-ri -> row-11-ri
row can be integers or symbols.
With add-rautavara-vars = t you will get 48
additional rows which is all twelve transpositions of
quint-row, quart-row,
retrograded-quint-row and retrograded-quart-row.
row0-qui -> row-11-qui
row0-qua -> row-11-qua
row0-rqui -> row-11-rqui
row0-rqua -> row-11-rqua
(create-twelve-tone-rows 'foo '(0 8 11 10 2 1 4 3 7 6 9 5)
:add-rautavara-vars nil :type :int)
->(setq foo0-o '(0 8 11 10 2 1 4 3 7 6 9 5))
(setq foo4-o '(4 0 3 2 6 5 8 7 11 10 1 9))
(setq foo1-o '(1 9 0 11 3 2 5 4 8 7 10 6))
(setq foo2-o '(2 10 1 0 4 3 6 5 9 8 11 7))
(setq foo10-o '(10 6 9 8 0 11 2 1 5 4 7 3))
(setq foo11-o '(11 7 10 9 1 0 3 2 6 5 8 4))
(setq foo8-o '(8 4 7 6 10 9 0 11 3 2 5 1))
(setq foo9-o '(9 5 8 7 11 10 1 0 4 3 6 2))
(setq foo5-o '(5 1 4 3 7 6 9 8 0 11 2 10))
(setq foo6-o '(6 2 5 4 8 7 10 9 1 0 3 11))
(setq foo3-o '(3 11 2 1 5 4 7 6 10 9 0 8))
(setq foo7-o '(7 3 6 5 9 8 11 10 2 1 4 0))
(setq foo7-r '(0 4 1 2 10 11 8 9 5 6 3 7))
(setq foo3-r '(8 0 9 10 6 7 4 5 1 2 11 3))
(setq foo6-r '(11 3 0 1 9 10 7 8 4 5 2 6))
(setq foo5-r '(10 2 11 0 8 9 6 7 3 4 1 5))
(setq foo9-r '(2 6 3 4 0 1 10 11 7 8 5 9))
(setq foo8-r '(1 5 2 3 11 0 9 10 6 7 4 8))
(setq foo11-r '(4 8 5 6 2 3 0 1 9 10 7 11))
(setq foo10-r '(3 7 4 5 1 2 11 0 8 9 6 10))
(setq foo2-r '(7 11 8 9 5 6 3 4 0 1 10 2))
(setq foo1-r '(6 10 7 8 4 5 2 3 11 0 9 1))
(setq foo4-r '(9 1 10 11 7 8 5 6 2 3 0 4))
(setq foo0-r '(5 9 6 7 3 4 1 2 10 11 8 0))
(setq foo5-i '(5 9 6 7 3 4 1 2 10 11 8 0))
(setq foo9-i '(9 1 10 11 7 8 5 6 2 3 0 4))
(setq foo6-i '(6 10 7 8 4 5 2 3 11 0 9 1))
(setq foo7-i '(7 11 8 9 5 6 3 4 0 1 10 2))
(setq foo3-i '(3 7 4 5 1 2 11 0 8 9 6 10))
(setq foo4-i '(4 8 5 6 2 3 0 1 9 10 7 11))
(setq foo1-i '(1 5 2 3 11 0 9 10 6 7 4 8))
(setq foo2-i '(2 6 3 4 0 1 10 11 7 8 5 9))
(setq foo10-i '(10 2 11 0 8 9 6 7 3 4 1 5))
(setq foo11-i '(11 3 0 1 9 10 7 8 4 5 2 6))
(setq foo8-i '(8 0 9 10 6 7 4 5 1 2 11 3))
(setq foo0-i '(0 4 1 2 10 11 8 9 5 6 3 7))
(setq foo5-ri '(0 8 11 10 2 1 4 3 7 6 9 5))
(setq foo9-ri '(4 0 3 2 6 5 8 7 11 10 1 9))
(setq foo6-ri '(1 9 0 11 3 2 5 4 8 7 10 6))
(setq foo7-ri '(2 10 1 0 4 3 6 5 9 8 11 7))
(setq foo3-ri '(10 6 9 8 0 11 2 1 5 4 7 3))
(setq foo4-ri '(11 7 10 9 1 0 3 2 6 5 8 4))
(setq foo1-ri '(8 4 7 6 10 9 0 11 3 2 5 1))
(setq foo2-ri '(9 5 8 7 11 10 1 0 4 3 6 2))
(setq foo10-ri '(5 1 4 3 7 6 9 8 0 11 2 10))
(setq foo11-ri '(6 2 5 4 8 7 10 9 1 0 3 11))
(setq foo8-ri '(3 11 2 1 5 4 7 6 10 9 0 8))
(setq foo0-ri '(7 3 6 5 9 8 11 10 2 1 4 0))
with type :symb you get integers converted to symbols.